import React, { Component } from 'react'
import { LISTITEM } from "../type/store.d"
interface MYPROPS{
    list: LISTITEM;
    handleClick: (item: LISTITEM) => void
}
function item(props:MYPROPS) {
    const { list } = props

    return (
        <div onClick={() => props.handleClick(list)}>
            <img src={list.img} alt="" />
            <h4>{list.title}</h4>
      </div>
    )

}

export default item